#include <iostream>
using namespace std;

int dayOfYear(int year, int month, int day) {
    int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
        days[1] = 29;
    }
    int dayCount = 0;
    for (int i = 0; i < month - 1; i++) {
        dayCount += days[i];
    }
    dayCount += day;
    return dayCount;
}

int main() {
    int year, month, day;
    cout << "请输入年、月、日：";
    cin >> year >> month >> day;
    int result = dayOfYear(year, month, day);
    cout << "这个日期是该年中的第 " << result << " 天。" << endl;
    return 0;
}